
<div>
  <div>
    <h1>
      <strong>标题:</strong>
      <%= @article.title %>
    </h1>

    <div class="col-xs-10 col-md-10">

      <p>
        <strong>内容:</strong>
        <%= @article.text %>
      </p>
    </div>
    <div class="col-xs-2 col-md-2">
      <p style=""><strong>评论区：</strong></p>
      <div style="word-wrap:break-word;
          word-break:break-all;">
        <%= render @article.comments %>
      </div>


      <p style="font-size: 20px"></p>
      <%= render 'comments/form' %>

    </div>
  </div>

  <br>
  <div style="text-align: center">
    <% if current_user %>
      <% if current_user.id === @article.user_id %>
        <%= link_to '编辑', edit_article_path(@article) ,class:"btn btn-primary" ,style:"margin-bottom:10px" %> <br>
        <%= link_to '删除', article_path(@article),
                            method: :delete,
                            data: { confrim: '你确定删除吗?' },class:"btn btn-primary" ,style:"margin-bottom:10px"%>
      <% end %>
    <% end %>
    <%= link_to '返回', articles_path ,class:"btn btn-primary" %>
  </div>
</div>